package club.justwill.single.persistence.support;

import java.io.Serializable;

/**
 * Created by xiangnan on 16-1-29.
 */
public class OrderItemPK implements Serializable {

    public OrderItemPK() {}
    private Long orderId;
    private Long skuId;

    @Override
    public int hashCode() {
        int result = 17;
        result = 37 * result + (int) (orderId ^ (orderId >>> 32));
        result = 37 * result + (int) (skuId ^ (skuId >>> 32));
        return result;
    }

    @Override
    public boolean equals(Object o) {
        if (!(o instanceof OrderItemPK))
            return false;
        OrderItemPK unit = (OrderItemPK) o;
        return unit.orderId == orderId
                && unit.skuId == skuId;
    }

    public Boolean canEqual(Object other) {
        return other instanceof OrderItemPK;
    }

    public void setOrderId(Long orderId) {
        this.orderId = orderId;
    }

    public void setSkuId(Long skuId) {
        this.skuId = skuId;
    }

    public Long getOrderId() {
        return this.getOrderId();
    }

    public Long getSkusId() {
        return this.skuId;
    }
}
